package com.example.administrator.myapplication;

import android.app.Application;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

/**
 * Created by Administrator on 2020/12/16.
 */

public class LoginPage extends AppCompatActivity {

    private EditText username;
    private EditText userpassword;
    private Button loginbtn;
    private TextView repwd;


    @Override
    public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
        super.onCreate(savedInstanceState, persistentState);
        setContentView(R.layout.activity_login_page);
        initView();
        initData();
        initEvent();
    }

    private void initView() {
        username = (EditText) findViewById(R.id.user_et);
        userpassword = (EditText) findViewById(R.id.password_et);
        loginbtn = (Button) findViewById(R.id.login_btn);
        repwd = (TextView) findViewById(R.id.repassword);
    }

    private void initData() {

    }

    private void initEvent() {
   loginbtn.setOnClickListener(new View.OnClickListener() {

       @Override
       public void onClick(View v) {
           Intent intent =new Intent(LoginPage.this,MainActivity.class);
           startActivity(intent);
       }
   });
        repwd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
    }
}
